<template>
  <div>
    <el-pagination
      :current-page="params.pagenum"
      :page-sizes="[2, 4, 6, 8]"
      :page-size="params.pagesize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
    />
  </div>
</template>

<script>
export default {
  props: {
    params: {
      type: Object,
      required: true
    },
    total: {
      type: Number,
      required: true
    }
  },
  data() {
    return {

    }
  },

  created() {

  },

  methods: {
    handleCurrentChange(val) {
      this.params.pagenum = val
      this.$emit('Set')
    },
    handleSizeChange(val) {
      this.params.pagesize = val
      this.$emit('Set')
    }
  }
}
</script>

<style scoped lang='less'>

</style>
